from celery import Celery, platforms
import os

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall_new.settings.dev')

platforms.C_FORCE_ROOT = True
celecry_app = Celery("meiduo")

# 导入配置
celecry_app.config_from_object("celery_task.config", namespace="CELERY")

celecry_app.autodiscover_tasks(['celery_task.sms','celery_task.email'])

# 开启celery
# celery -A 应用路径(.包路径) worker -l info
# celery -A celery_task.main worker -l info -P threads
